#ifndef CJSON_DEBUG_H
#define CJSON_DEBUG_H

#include "cjsoncommon.h"

#ifdef CJSON_DEBUG

#include <fstream>

#if defined CJSON_USE_UNICODE
#define jofstream std::wofstream
#else
#define jofstream std::ofstream
#endif

#endif

class CDebugLog
{
private:
#ifdef CJSON_DEBUG
  jofstream ofs;
#endif
public:
  CDebugLog(const char * file_name);
  ~CDebugLog();
  CDebugLog & operator << (const jchar* value);
  CDebugLog & operator << (jstring value);
  CDebugLog & operator << (int value);
  CDebugLog & operator << (unsigned value);
  CDebugLog & operator << (unsigned long value);
};

#endif //CJSON_DEBUG_H

